<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="./vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- 只写对象名遍历对象获取value -->
    <ul>
      <li v-for="item in info">{{item}}</li>
    </ul>
    <!-- 获取value和key -->
    <ul>
      <li v-for="(value,key) in info">{{key}}-{{value}}</li>
    </ul>
    <!-- 获取value、key和index -->
    <ul>
      <li v-for="(value,key,index) in info">{{index}}-{{key}}-{{value}}</li>
    </ul>
  </div>

  <script>
    var vm = new Vue({
      el: '#app',
      data: {
        name: 'TaecL',
        info: {
          name: 'Taec',
          age: 30,
          sex: '男'
        }
      }
    })
  </script>
</body>

</html>